const mongoose = require('mongoose');
var Schema = mongoose.Schema;

var foodSchema = new Schema({
  username:  {type:String,required:true}, // 创建的人
  shopname:  {type:String,required:true}, // 商品名 
  mark:  {type:String,required:false}, // 备注 
  status: {type:Number,required:true}, // 购买等级 1 2 3 紧急、次要、未来
  time:  {type:String,required:false}, // 购买时间 
  createtime: {type:String,required:false}, // 创建时间
  updatetime: {type:String,required:false}, // 更新时间
},
{ timestamps: {createdAt: 'created', updatedAt: 'updated'} });

var Shop = mongoose.model('shops', foodSchema);

module.exports = Shop;